package org.suk.dp.strategy;

/**
 * Description:打折收费子类 <br/>
 * @version V1.0  2017/6/20 12:22  by 石冬冬(dongdong.shi@ucarinc.com) - Heil Hitler
 */
public class CashRebate extends CashSuper {
    /**
     * 折扣率，默认为1，非打折
     */
    private double rebate = 1;

    public CashRebate(double ratio) {
        this.rebate = ratio;
    }

    @Override
    double acceptCash(double money) {
        return money * this.rebate;
    }
}
